/**
 * Created by Administrator on 2017/7/7.
 */
define(function(require, exports){
	// 汇总数据
	exports.onMain = function(boot, data, app){
		var title = LANG('汇总数据');
		var con = app.getContainer({
			scenes: 'main',
			full: false,
			sitelist: false,
			setup_btn: false,
			title:"",
			type: 'tabSidebar',
			content_config: {
				'addClass': 'cool',
			}
		});
		con.createBusiness(data.name + '_bar', 'layout/navbar.base', {
			'contentType': 'info',
			'autoBuild': true,
			'data': data,
			'addTitle': title,
			'type': 'report'
		}, function(mod, created){
			if(mod){
				mod.setData(data, title);
			}
		});

		con.createBusiness(data.name + "account", 'report/action/summary/list.account', {
			tabText: LANG('账户'),
			tabType: 'account',
			isBrand: true
		}, function(mod, created){
			if(created){
				mod.reload();
			}
		});
		con.createBusiness(data.name + "adsense", 'report/action/summary/list.adver', {
			tabText: LANG('广告主'),
			tabType: 'adver',
			isBrand: true
		}, function(mod, created){
			if(created){
				mod.reload();
			}
		});
		
		con.createBusiness(data.name + "channel", 'report/action/resource/list.channel',{
			grid: {
				url: 'overview/channel',
				gridName: 'channelOverViewSet',
				exportParam: 'overview/channel'
			},
			tabText: LANG('渠道'),
			tabType: 'channel',
			isBrand: true
		}, function(mod, created){
			if(created){
				mod.reload();
			}
		});
	}
});